package com.team.service.Impl;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import com.team.dao.impl.ShoperDaoImpl;
import com.team.entity.Shoper;

@Service
@Transactional
public class ShoperServiceImpl {
     @Autowired
	private ShoperDaoImpl shoperDaoImpl;
	
	public boolean add(Shoper shoper){
		int add = shoperDaoImpl.add(shoper);
		if(add>0){
			this.shoperDaoImpl.add(shoper);
			return true;		
		}else{
		return false;	
		}
		
	}
	
	public void detele(Integer id){
		this.shoperDaoImpl.detele(id);
	}
	
	 public void update(Shoper shoper){
		 this.shoperDaoImpl.update(shoper);
	    }
	 
	  public List<Shoper> foundAll(){
		return this.shoperDaoImpl.foundAll();
	  }
	
}
